<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GonzalesFileManager.aspx.cs" Inherits="GonzalesFileManager" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <link href="WebStyle.css" rel="stylesheet" type="text/css" />
</head>

<body>
<form id="FormModal" method="post" runat="server">
  <table width="100%" border="0" cellpadding="2" cellspacing="1">
    <tr>
      <td height="40" class="PageTitle"><asp:Label ID="Label_Title" runat="server" Text='File Manager'></asp:Label></td>
    </tr>
    <tr>
      <td><table width="100%" border="0" cellpadding="2" cellspacing="0" class="FormBorder">
        <tr>
          <td><asp:Table CellPadding="5" CellSpacing="0" ID="Table_MessageBox" Width="100%" runat="server" Visible="false">
            <asp:TableRow>
              <asp:TableCell CssClass="ErrorBox" ></asp:TableCell>
            </asp:TableRow>
          </asp:Table></td>
        </tr>
        <tr>
          <td class="TableResultCriteriaBar"><table width="100%" border="0" cellspacing="0" cellpadding="1">
            <tr>
              <td>&nbsp;</td>
              <td align="right"><asp:DropDownList CssClass="FormDropDown" ID="DropDownList_SortBy" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList_SortBy_SelectedIndexChanged"></asp:DropDownList>
                      <asp:DropDownList CssClass="FormDropDown" ID="DropDownList_SortOrder" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropDownList_SortOrder_SelectedIndexChanged"></asp:DropDownList></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td valign="top"><asp:GridView ID="GridViewResult" OnRowCreated="OnRowCreated" runat="server" AutoGenerateColumns="False"
              BorderStyle="None" BorderWidth="0px" CellPadding="5" CssClass="FormBorder" Width="100%">
            <columns>
              <asp:BoundField DataField="FileName" HeaderText="File Name" HtmlEncode="False">
                <itemstyle HorizontalAlign="Left" Width="150px" />
                <headerstyle HorizontalAlign="Left" />              </asp:BoundField>
              <asp:BoundField DataField="FileType" HeaderText="File Type"> 
                  <ItemStyle HorizontalAlign="Center" Width="40px" />              </asp:BoundField>
              <asp:BoundField DataField="UploadDateInStr" HtmlEncode="False" HeaderText="Uploaded Date" >
                <ItemStyle HorizontalAlign="Center" Width="100px" />
                <HeaderStyle HorizontalAlign="Center" />              </asp:BoundField>
                <asp:BoundField DataField="UploadedBy" HeaderText="Uploaded By">
                    <ItemStyle HorizontalAlign="Center" Width="100px" />
                </asp:BoundField>
                <asp:BoundField DataField="SelectLink" HtmlEncode="False">
                    <ItemStyle HorizontalAlign="Center" Width="40px" />                </asp:BoundField>
                <asp:BoundField DataField="DeleteLink" HtmlEncode="False">
                    <ItemStyle HorizontalAlign="Center" Width="40px" />                </asp:BoundField>
              </columns>
            <RowStyle CssClass="GridViewItem" />
            <headerstyle CssClass="GridViewHeader" />
          </asp:GridView></td>
        </tr>
        <tr>
          <td valign="top">
          <asp:Table ID="Table_FileUpload" runat="server" CellPadding="0" CellSpacing="0" BorderStyle="None" Width="100%">
            <asp:TableRow><asp:TableCell>
          <table width="100%" border="0" cellpadding="5" cellspacing="1" class="FormBorder">
            <tr>
              <td class="FormLineItem" style="width:30% ;height: 34px"><asp:Label CssClass="FormField" ID="Label_SupportDocument" runat="server" Text="Supporting Documents:" /></td>
              <td class="FormLineItem" style="height: 34px">&nbsp;<asp:FileUpload ID="FileUploadSource" Width="95%" runat="server" CssClass="FormButton" /></td>
            </tr>
            <tr>
              <td class="FormLineItemAlt"><asp:Button CssClass="FormButton" ID="Button_Upload" runat="server" Text="Upload" OnClick="Button_Upload_Click" />&nbsp;<asp:Button CssClass="FormButton" ID="Button_Cancel" runat="server" Text="Cancel" /></td>
              <td class="FormLineItemAlt">&nbsp;</td>
            </tr>

          </table>
            </asp:TableCell></asp:TableRow>
          </asp:Table>
          <asp:Button CssClass="FormButton" ID="Button_Cancel2" Visible="false" runat="server" Text="Cancel" />
              <asp:HiddenField ID="HiddenField_TotalFiles" runat="server" Value="0" />
          </td>
        </tr>
      </table></td>
    </tr>
  </table>
</form>

<script language="javascript" type="text/javascript">

    parent.document.getElementById("Button_FileManager").value = "Supporting Documents (" + document.getElementById("HiddenField_TotalFiles").value + ")";

</script>

</body>
</html>
